package com.squirrel.common.exception;

import com.squirrel.common.response.code.IEnum;

/**
 * @Description BaseException 基础异常类
 * @Author 关远键
 * @Version v1.0.0
 * @Date 2021/11/9 14:27
 */
public class BaseException extends RuntimeException implements IException {
    private IEnum iEnum;

    public BaseException() {
    }

    public <E extends IEnum> BaseException(E e) {
        super(e.getMessage());
        this.iEnum = e;
    }

    @Override
    public IEnum getIEnum() {
        return iEnum;
    }
}
